import type { Technology } from '@/types'
import { http } from '@/utils/http'
import { getBusinessApiPrefix } from '@/utils/config'

/**
 * 获取所有技术栈
 */
export const getAllTechnologiesAPI = () => {
	return http<Technology[]>({
		url: `${getBusinessApiPrefix()}/technologies/getAllTechnologiesAPI`,
		method: 'POST',
		data: {},
	})
}


/**
 * 根据ID获取技术栈
 */
export const getTechnologyByCodeAPI = (code : string) => {
	return http<Technology>({
		url: `${getBusinessApiPrefix()}/technologies/getTechnologyByCodeAPI`,
		method: 'POST',
		data: { code },
	})
}